<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="s" uri="/struts-tags" %>

<%@ taglib prefix="odb" uri="/oracle-dashboard" %>


<h2>Rollback Segment STATISTICS</h2>
(Reference: 
<a target='_blank' href='http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_3192.htm#I1023453'>DBA_HIST_SYSSTAT</a>)

<span style='font-style:italic; '>
	Current AWR Interval: ${awrsetting.interval} MINUTES
</span>

<div id='all-statistics'>
	<div style='position:absolute; right:10px'>
		
		<form id='xysetting'>
		
		Level 1: 
		<select disabled="disabled">
			<option value='6'>1 Day</option>
		</select> &nbsp;
		Level 2: 
		<select name='x_block' id='x_block'>
			<option value='8'>${awrsetting.interval} MINUTES x 8</option>
			<option value='7'>${awrsetting.interval} MINUTES x 7</option>
			<option value='6'>${awrsetting.interval} MINUTES x 6</option>
			<option value='5'>${awrsetting.interval} MINUTES x 5</option>
			<option value='4'>${awrsetting.interval} MINUTES x 4</option>
		</select> &nbsp;
		Level 3:
		<select name='y_block' id='y_block'>
			<option value='1'>${awrsetting.interval} MINUTES x 1</option>
			<option value='2'>${awrsetting.interval} MINUTES x 2</option>
			<option value='3'>${awrsetting.interval} MINUTES x 3</option>
		</select> &nbsp;
		<input type='submit' class='button' value='Apply new aggregation setting'/>
		</form>
	</div>
	
	<ul>
		<li><a href="#tabs-1">Rollback Percentage</a></li>
		<li><a href="#tabs-2">Rollback Per Second</a></li>
	</ul>


	<div id="tabs-1">
		
		<p style='background:#B3A8AC'>
			<odb:ThresholdDisplay statistics='Rollback Percentage' />		
		</p>
		
		<p>
			- <span style='text-decoration: underline'>Latest Value</span>:
			<odb:LastValue statistics='Rollback Percentage' />
		</p>

		<p>
			- <span style='text-decoration: underline'>Aggregated Value</span>: 
				<a href='full-report?statistics=Rollback Percentage' class='full-report'>View Full Report</a>
			<odb:AggregatedValue statistics='Rollback Percentage' />
		</p>
	</div>

	<div id="tabs-2">
		
		<p style='background:#B3A8AC'>
			<odb:ThresholdDisplay statistics='Rollback Per Second' />		
		</p>
		
		<p>
			- <span style='text-decoration: underline'>Latest Value</span>:
			<odb:LastValue statistics='Rollback Per Second' />
		</p>

		<p>
			- <span style='text-decoration: underline'>Aggregated Value</span>: 
				<a href='full-report?statistics=Rollback Per Second' class='full-report'>View Full Report</a>
			<odb:AggregatedValue statistics='Rollback Per Second' />
		</p>
	</div>
</div>

<div id='Rollback Percentage' title='Rollback Percentage' style='display:none'>
	Some information about Rollback Percentage
</div>
<div id='Rollback Per Second' title='Rollback Per Second' style='display:none'>
	Rollback Per Second
</div>
	 
<script>
	$(function() {
		$("#all-statistics").tabs();
		$('.full-report').button();
	});
	$("#tabs-1").treeview({
		persist: "location",
		collapsed: true,
		unique: true
	});
	$("#tabs-2").treeview({
		persist: "location",
		collapsed: true,
		unique: true
	});

	$('.button').button();
	if ('${param.x_block}' != "")
		$("#x_block").val('${param.x_block}');
	if ('${requestScope.x_block}' != "")
		$("#x_block").val('${requestScope.x_block}');
	if ('${param.y_block}' != "")
		$("#y_block").val('${param.y_block}');
	if ('${requestScope.y_block}' != "")
		$("#y_block").val('${requestScope.y_block}');
</script>